#include <string.h>
#include "ffutils.h"
#include "gmutils.h"
#include "yuvutils.h"

int main(int argc, char **argv) {
    printf("Hello, World!\n");
//    main1();
    /*uint8_t **data;
    Image *image;
    image = image_compose("/home/xiefeihong/图片/1.jpg", "/home/xiefeihong/图片/2.jpg");
    strcpy(image->filename, "/home/xiefeihong/图片/out.jpg");
    ImageInfo *info = CloneImageInfo(0);
    if(!WriteImage(info, image)){
        printf("%d", 1);
    }*/
//    data = getrgb(image);
    /*int i = 0;
    for (int x = 0; x < image->magick_rows; x++)
    {
        for (int y = 0; y < image->magick_columns; y++, i++)
        {
            printf("[x:%d, y:%d] : [r:%d, g:%d, b:%d]\n", x, y, data[0][i], data[1][i], data[2][i]);
        }
    }
    free(data);
    free(data[0]);
    free(data[1]);
    free(data[2]);*/
    main2();
    /*char *image_path;
    Image *image;
    uint8_t *rgbs;
    uint8_t **dst_yuv;
    image_path = "/home/xiefeihong/图片/test.jpg";
    image = get_image(image_path);
    rgbs = getrgbs(image);
    dst_yuv = rgb_to_yuv(rgbs, image->columns, image->rows);
    long num = image->columns * image->rows;
    for (int i = 0; i < num; i++) {
        uint8_t y = dst_yuv[0][i];
        uint8_t u = dst_yuv[1][i];
        uint8_t v = dst_yuv[2][i];
        printf("y : %d, u : %d, v : %d\n", y, u, v);
    }*/
    return 0;
}